//package com.njust.utils.serialize;
//
//import java.io.IOException;
//import java.text.SimpleDateFormat;
//import java.util.Date;
//
//import com.fasterxml.jackson.core.JsonGenerator;
//import com.fasterxml.jackson.core.JsonProcessingException;
//import com.fasterxml.jackson.databind.SerializerProvider;
//
//import springfox.documentation.spring.web.json.JsonSerializer;
//
///**
// * 将时间的ms级别改为秒 @JsonSerialize(using = Date2LongSerializer.class)
// * Created by zhujiawei on 2017/12/3.
// */
//public class Date2StringSerializer extends JsonSerializer<Date> {
//
//    private static SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
//
//    @Override
//    public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
//
//        jsonGenerator.writeString(format.format(date));
//    }
//}
